package ms.shop.dao;

import mapper.MsMapper;
import ms.shop.entity.Sku;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface SkuDAO extends MsMapper<Sku> {

    /**
     * 分页查询
     * @return
     */
    @Select("<script>"
            + "select * from t_sku "
            + "where 1=1 "
            + "order by create_time desc" + "</script>")
    @ResultType(Sku.class)
    List<Sku> queryAttrs();
}
